﻿using Sustainalytics.CRT.Synchronization.Exception;
using Sustainalytics.Synchronization.Interface;
using Xunit;
using Xunit.Abstractions;

namespace Sustainalytics.CRT.Synchronization.Tests.Integration
{
    public class FocusedRatingsComputationSyncTest
    {
        private readonly ITestOutputHelper helper;

        private readonly SyncContext context;

        public FocusedRatingsComputationSyncTest(ITestOutputHelper helper)
        {
            this.helper = helper;
            context = TestSyncContextFactoy.Create();
        }

        [Fact]
        public void FocusedRatingsComputationSyncStepRun()
        {
            var sut = new FocusedRatingsComputationSyncStep2();
            try
            {
                sut.Start(context);
            }
            catch (IndicatorNotFoundException exception)
            {
                this.helper.WriteLine(exception.IndicatorCode);
            }
        }
    }
}